1. Field of the Invention
The present invention relates generally to a pattern inspection apparatus for inspecting a pattern and detecting defects appearing in the external shape of various inspected objects, and relates more specifically to a pattern inspection apparatus for inspecting patterns on high resolution printed wiring boards, lead frames, semiconductor wafers, and the like and photomasks therefor, and detecting minute defects therein.
2. Description of the Related Art
One method of inspecting patterns on high precision printed wiring boards, lead frames, semiconductor wafers, and the like and photomasks therefor is the comparative method. This method detects defects in an inspected object by comparing the values of positionally corresponding pixels (referred to below as simply “corresponding pixels”) in a reference image representing a good pattern with no defects and the inspection image representing the pattern on the inspected object. When this comparative method uses a multivalued image for pattern inspection, detection errors can occur due to error in the sampling position when the image is captured (referred to below as “image sampling error”). More specifically, even if a difference between compared pixel values in the reference image and inspection image is detected, it is not known whether this difference is due to an actual defect or to the effects of this image sampling error, and parts that are not actually defects are falsely detected as defects.
Japanese Patent Laid-Open Publication (kokai) 2000-65545 teaches a pattern inspection method as a solution to this problem. This pattern inspection method expands the digital image defect detection method taught in Japanese Patent Publication (kokoku) H6-21769 (U.S. Pat. No. 4,803,734 corresponds to Publication H6-21769 and is incorporated herein by reference) for application to multivalued images by setting a pixel value range with width for the value of each pixel in the reference image. This pixel value range is applied as an allowable difference range (referred to below as the “tolerance range”) for determining if the values of corresponding pixels in the reference image and inspection image are the same. Using this method a pixel in the inspection image is deemed to match the corresponding pixel in the reference image if its pixel value is within the pixel value range of the corresponding pixel in the reference image, and parts where these values match are deemed to not be a defect. This makes it possible to prevent overdetection (falsely detecting parts that are not defects to be defects) due to sampling error in parts where there is great variation in pixel values, such as at the edge parts of an image.
With the pattern inspection method taught in Japanese Patent Laid-Open Publication (kokai) 2000-65545 (below the “prior art method”), however, the pixel value range (tolerance range) set for pixels of small pattern 201 is wide when this small pattern 201 is contained in reference image Iref. More specifically, the pixel value range set for the pixel in the center of small pattern 201 (the “center pixel” below) is set based on the highest pixel value Va and the lowest pixel value Vb in the pixel group in the neighborhood of the center pixel and thus becomes a wide range as indicated by the x-axis profile Pref shown in FIG. 7 passing through small pattern 201 in reference image Iref. It should be noted that Va is the value of the center pixel in reference image Iref and the value of the pixel in the inspected object image Iobj corresponding to the center pixel is 0 in the example shown in FIG. 7, and the difference between the center pixel value and the corresponding pixel in the inspected object image Iobj (the “pixel difference” below) is therefore Va.
As noted above, the pixel value range for the center pixel is from the lowest pixel value Vb to the highest pixel value Va in the group of neighborhood pixels including the center pixel with the prior art method, and pixel values in this range Vb to Va are considered to match the pixel value of the center pixel. This means that the pixel difference at the center pixel in this case is Vb as indicated by profile Pcmp in FIG. 7. (Note that profile Pcmp combines profiles Pref and Pobj in order to compare x-axis profile Pref in reference image Iref and x-axis profile Pobj in inspected object image Iobj corresponding to profile Pref.) As will be understood from this example using reference image Iref and inspected object image Iobj and profile Pcmp, the difference detected by the comparison of the prior art method will therefore be smaller than the actual difference if a pattern defect such as a pattern loss exists in small pattern 201 of the inspected object. This means that detection sensitivity to small pattern defects drops with the prior art method due to the pixel value range setting.
The reference image is generally replaced while inspection continues in repeated pattern inspection operations as shown in FIG. 8, but this makes it easier to miss defects when the pattern is inspected using the above prior art method. This problem is further described below with reference to FIG. 8 and FIG. 9.
In the example shown in FIG. 8 repeat pattern A is first used as the reference image pattern, repeat pattern B as the pattern of the inspected object image, and a first inspection is made by comparing these repeat patterns A and B. Next, repeat pattern B is used as the reference image pattern and repeat pattern C as the pattern of the inspected object image, and, a second inspection is made by comparing patterns B and C. These first and second inspections compare the patterns of the reference image and inspected object image, generate a difference map based on the result, and determine candidate defects by binary-digitizing the difference map using a specific threshold value Th. Defects in pattern B are then identified by obtaining data equivalent to the AND of the binary data indicating the candidate defects obtained from the first and second inspections. If a small defect 301 is present in pattern B as shown in FIG. 9 in this repeated pattern inspection and a pixel value range is set for each pixel in the reference image according to the above prior art method, the value of the pixel difference for the pixels corresponding to small defect 301 will be different in the first and second inspections. As a result, if the candidate defects are obtained by binary-digitizing the difference map generated from both inspections using the same threshold value Th, defect detection sensitivity drops in the second inspection because the value of the pixel difference is lower, and it becomes easy to miss defects.
It should be noted that this problem can be avoided by suitably changing the threshold value Th used to detect candidate defects from the difference map in the first and second inspections, but in practice it is very difficult to suitably change the threshold value Th so that defects are not missed because it is not known where the defects exist.